package com.wx.infrastructure.enums;

import com.wx.infrastructure.domain.ErrorCode;
import lombok.Getter;

/**
 * wx_back_end
 *
 * @Auther: cheng.tang
 * @Date: 2023/2/28 10:04 PM
 * @Description:
 */
@Getter
public enum ErrorCodeEnum implements ErrorCode {
    SUCCESS(200, "success"),
    FAIL(500, "出现未知异常"),
    ;
    private final int code;
    private String msg;

    ErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public ErrorCode setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
